<div class="kontent_box">
    
    <div class="kontent_panel">
    <div class="reg_input">
    <div><h3>Edit Data</h3></div>
    <?php $data = $data_peneliti->result(); ?>
    <table>
        <?php echo form_open_multipart('member/edit'); ?>
        <tr>
            <td id="text_" style="width: 200px;">Nama*</td>
            <td ><input  type="text" name="nama" value="<?php echo $data[0]->PENELITI_NAMA; ?>" /></td>
            <td class="eror_td"><?php echo form_error('nama'); ?></td>
        </tr>
        <tr>
            <td id="text_">Gelar Depan </td>
            <td><input  type="text" name="gelar_depan" value="<?php echo $data[0]->PENELITI_GELAR_DEPAN; ?>" /></td>
            <td class="eror_td"><?php echo form_error('gelar_depan'); ?></td>
        </tr>
        <tr>
            <td id="text_">Gelar Belakang </td>
            <td><input  type="text" name="gelar_belakang" value="<?php echo $data[0]->PENELITI_GELAR_BELAKANG; ?>" /></td>
            <td class="eror_td"><?php echo form_error('gelar_belakang'); ?></td>
        </tr>
        <tr>
            <td id="text_">NIDN*</td>
            <td><input  type="text" name="nidn" value="<?php echo $data[0]->PENELITI_NIDN; ?>" /></td>
            <td class="eror_td"><?php echo form_error('nidn'); ?></td>
        </tr>
        <tr>
            <td id="text_">NIP* </td>
            <td><input  type="text" name="nip" value="<?php echo $data[0]->PENELITI_NIP; ?>" /></td>
            <td class="eror_td"><?php echo form_error('nip'); ?></td>
        </tr>
        <tr>
            <td id="text_">Email* </td>
            <td><input  type="text" name="email" value="<?php echo $data[0]->PENELITI_EMAIL; ?>" /></td>
            <td class="eror_td"><?php echo form_error('email'); ?></td>
        </tr>
        <tr>
            <td id="text_">Jenis Kelamin* </td>
            <td>
                <select  type="text" name="jk" ">
                    <option value="">Pilih Jenis</option>
                    <?php if($data[0]->PENELITI_JENIS_KELAMIN == 1) { ?>
                    <option value="1" selected>Pria</option>
                    <option value="2">Wanita</option>
                    <?php } else if($data[0]->PENELITI_JENIS_KELAMIN == 2) { ?>
                    <option value="1" selected>Pria</option>
                    <option value="2">Wanita</option>                    
                    <?php } ?>
                </select>
            </td>
            <td class="eror_td"><?php echo form_error('jk'); ?></td>
        </tr>
        <tr>
            <td id="text_">Tanggal Lahir* </td>
            <td><input  type="text" name="tgl" value="<?php echo $data[0]->PENELITI_TGL_LAHIR; ?>" /></td>
            <td class="eror_td"><?php echo form_error('tgl'); ?></td>
        </tr>
        <tr>
            <td id="text_">No. HP* </td>
            <td><input  type="text" name="nohp" value="<?php echo $data[0]->PENELITI_NOHP; ?>" /></td>
            <td class="eror_td"><?php echo form_error('nohp'); ?></td>
        </tr>
        
        <tr>
            <td id="text_">Alamat* </td>
            <td><textarea  type="text" name="alamat"  ><?php echo $data[0]->PENELITI_ALAMAT; ?></textarea></td>
            <td class="eror_td"><?php echo form_error('alamat'); ?></td>
        </tr>
        
        <tr>
            <td id="text_">Jurusan* </td>
            <td>
                <select  type="text" name="jurusan">
                    <option value="">Pilih Jurusan</option>
                    <?php foreach ($list_jurusan->result() as $r) { ?>
                        <?php if($data[0]->JURUSAN_ID == $r->JURUSAN_ID){ ?>
                            <option value="<?php echo $r->JURUSAN_ID; ?>" selected><?php echo $r->FAKULTAS_NAMA_SINGKATAN; ?> - <?php echo $r->JURUSAN_NAMA; ?></option>
                    <?php } else { ?>
                            <option value="<?php echo $r->JURUSAN_ID; ?>"><?php echo $r->FAKULTAS_NAMA_SINGKATAN; ?> - <?php echo $r->JURUSAN_NAMA; ?></option>
                    <?php } 
                    
                    }?>
                </select>
            </td>
            <td class="eror_td"><?php echo form_error('jurusan'); ?></td>
        </tr>
        <tr>
            <td id="text_">Jabatan </td>
            <td><input  type="text" name="jabatan" value="<?php echo $data[0]->PENELITI_GOLONGAN; ?>" /></td>
            <td class="eror_td"><?php echo form_error('jabatan'); ?></td>
        </tr>
        <tr>
            <td id="text_">Golongan* </td>
            <td><input  type="text" name="golongan" value="<?php echo $data[0]->PENELITI_JABATAN; ?>" /></td>
            <td class="eror_td"><?php echo form_error('golongan'); ?></td>
        </tr>
        <tr>
            <td>Foto</td>
            <td><img style="width: 100px" src="<?php echo base_url() ?>/static/images/member/photo/<?php echo $data[0]->PENELITI_FOTO; ?>"/></td>
            <td class="eror_td"></td>
        </tr>
        <tr>
            <td></td>
            <td><input style="width: 250px" type="file" name="userfile"/></td>
            <td class="eror_td"></td>
        </tr>
        <tr>
            <td></td>
            <td><input  type="submit" value="Edit"/></td>
            <td class="eror_td"></td>
        </tr>
    <?php form_close() ?>
    </table>
    
    </div>
</div>